package cn.kgc.easybuy.dao;

import cn.kgc.easybuy.pojo.BuyCar;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @program: yingzi-wants-to-sleep
 * @description:
 * @author: 敖成
 * @create: 2025-09-18 15:29
 **/
@Mapper
@Repository
public interface BuyCarMapper {


    List<BuyCar> selectAllCar(Integer userId);

    List<BuyCar> selectBuyCarByUserId(Map<String,Object> params);

    int addBuyCar(BuyCar buyCar);

    int updateBuyCar(BuyCar buyCar);

    int deleteBuyCarById(Integer id);

    int deleteBuyCarByUserId(Integer userId);

    BuyCar addBuyCarNum(@Param("userId") Integer userId, @Param("pid") Integer pid);

}
